package repository

import (
	"SeatSystem/internal/model"
	"errors"
)

func Register(user model.User) error {
	var temp model.User
	db.Where("phone=", user.Phone).First(&temp)
	if temp.ID != 0 {
		return errors.New("repository.write.Register:用户已存在")
	}
	db.Create(&user)
	return nil
}

func SaveTime(time model.Time) {
	db.Create(&time)
}

func SaveHistroy(history model.History) {
	db.Create(&history)
}

func SaveFeedBack(back model.FeedBack) {
	db.Create(&back)
}

func DeleteHistory() {

}
func DeleteTime() {

}
